package com.iris.live.services.data.repositories.impl;

import com.google.common.collect.Maps;
import com.iris.live.services.data.repositories.TodayExhibitionHistoryRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by ThinkPad on 2016/9/22.
 */
@Repository
public class TodayExhibitionHistoryRepositoryImpl extends BaseRepository implements TodayExhibitionHistoryRepository {

    @Override
    public List getTodayExhibitionHistroyRecord(String permit,String startDate) {
         String sql="SELECT a.`是否留档` 留档,a.`是否试驾` 试乘试驾,a.`是否报价` 报价,a.`是否订单` 订单,a.`是否交车` 交车 FROM `顾客进店记录表` AS a \n" +
                 "WHERE  a.`许可` = :permit AND a.`进店日期` < :startDate\n";
        Map params = Maps.newHashMap();
        params.put("permit", permit);
        params.put("startDate",startDate);
        return this.getList(sql, params);
    }
}
